/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦，本文采用木兰宽松许可证第2版]
 * 
 * https://zhiqim.org/project/zhiqim_components/zhiqim_upload_large.htm
 *
 * Zhiqim UploadLarge is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.uploadlarge.dbo;

import java.io.Serializable;
import java.sql.Timestamp;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 大文件上传分块表 对应表《UPLL_CHUNK》
 */
@AnAlias("UpllChunk")
@AnNew
@AnTable(table="UPLL_CHUNK", key="FILE_MD5,CHUNK_SIZE", type="InnoDB")
public class UpllChunk implements Serializable
{
    private static final long serialVersionUID = 1L;

    @AnTableField(column="FILE_MD5", type="string,48,char", notNull=true)    private String fileMd5;    //1.文件MD5，文件消息摘要，检查文件唯一性
    @AnTableField(column="CHUNK_SIZE", type="int,11", notNull=true)    private int chunkSize;    //2.文件分块大小，当文件MD5相同且分块相同时，认为是同一文件
    @AnTableField(column="CHUNK_NUM", type="int,11", notNull=true)    private int chunkNum;    //3.文件总分块数
    @AnTableField(column="CHUNK_NO", type="int,11", notNull=true)    private int chunkNo;    //4.文件已上传分块数
    @AnTableField(column="CHUNK_TIME", type="datetime", notNull=true)    private Timestamp chunkTime;    //5.文件分块第一次上传时间
    @AnTableField(column="FILE_NAME", type="string,512", notNull=true)    private String fileName;    //6.文件名称，由用户指定的文件名，对应下载的文件名
    @AnTableField(column="FILE_EXT", type="string,10", notNull=true)    private String fileExt;    //7.文件扩展名
    @AnTableField(column="FILE_TEMP_PATH", type="string,200", notNull=true)    private String fileTempPath;    //8.文件临时路径，保存到硬盘的绝对路径，格式为

    public String toString()
    {
        return Jsons.toString(this);
    }

    public String getFileMd5()
    {
        return fileMd5;
    }

    public void setFileMd5(String fileMd5)
    {
        this.fileMd5 = fileMd5;
    }

    public int getChunkSize()
    {
        return chunkSize;
    }

    public void setChunkSize(int chunkSize)
    {
        this.chunkSize = chunkSize;
    }

    public int getChunkNum()
    {
        return chunkNum;
    }

    public void setChunkNum(int chunkNum)
    {
        this.chunkNum = chunkNum;
    }

    public int getChunkNo()
    {
        return chunkNo;
    }

    public void setChunkNo(int chunkNo)
    {
        this.chunkNo = chunkNo;
    }

    public Timestamp getChunkTime()
    {
        return chunkTime;
    }

    public void setChunkTime(Timestamp chunkTime)
    {
        this.chunkTime = chunkTime;
    }

    public String getFileName()
    {
        return fileName;
    }

    public void setFileName(String fileName)
    {
        this.fileName = fileName;
    }

    public String getFileExt()
    {
        return fileExt;
    }

    public void setFileExt(String fileExt)
    {
        this.fileExt = fileExt;
    }

    public String getFileTempPath()
    {
        return fileTempPath;
    }

    public void setFileTempPath(String fileTempPath)
    {
        this.fileTempPath = fileTempPath;
    }

}
